let SWDA_BattleManager_endBattle2 = BattleManager.endBattle;

BattleManager.endBattle = function(result) {
    // 重置敌群中被变更“路人”属性的敌人数据。
    for(let i = 0; i< $gameTroop.members().length; i++){
        if ($dataEnemies[$gameTroop.members()[i].enemy().id].meta["Stranger"])
            $gameTroop.members()[i].enemy().stranger = true;
        else
            $gameTroop.members()[i].enemy().stranger = false
    }
    DataManager.saveGlobalEnemyBook();  //存储神魔录
    SWDA_BattleManager_endBattle2.call(this, result);
};